package examlab.thread;

class BigThread extends Thread {

    BigThread(String s) {
        super(s);
    }

    @Override
    public synchronized void run() {
        for (int i = 0; i < 4; i++) {
            System.out.print(currentThread().getName() + i + " ");
        }
    }

    public static void main(String args[]) {
        Thread big1 = new BigThread("a");
        Thread big2 = new Thread(big1, "b");
        big1.start();
        big2.start();
    }
}